#include <stdio.h>
#include <stdlib.h>

int main (int argc, char const* argv[])
{
    int i;
    float c, result;
    while (scanf("%f", &c) && c != 0) {
        i = 2;
        result = 0;
        while (result < c) {
            result = result + 1.00 / i;
            i++;
        }

        printf("%d card(s)\n", i - 2);
    }

    return 0;
}
